//
// Created by xbm on 23-3-1.
//
#pragma once

#include <string>
#include <fstream>

using namespace std;


namespace logging::fileUtil {
class AppendFile {
public:
    explicit AppendFile(const string &filename) : file_(filename) {
    }

    ~AppendFile() {
        file_.close();
    }

    void append(string_view buf) {
        file_ << buf;
    }

private:
    ofstream file_;
};


}

